3.2.6 \(\int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx\) [106]

Optimal. Leaf size=225 \[ \frac {a^2 f^2 \cos \left (2 e-\frac {2 c f}{d}\right ) \text {Ci}\left (\frac {2 c f}{d}+2 f x\right )}{d^3}-\frac {a^2 f^2 \text {Ci}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d^3}-\frac {4 a^2 f \cos \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right ) \sin ^3\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {2 a^2 \sin ^4\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {a^2 f^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d^3}-\frac {a^2 f^2 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{d^3} \]

[Out]

a^2*f^2*Ci(2*c*f/d+2*f*x)*cos(-2*e+2*c*f/d)/d^3-a^2*f^2*cos(-e+c*f/d)*Si(c*f/d+f*x)/d^3+a^2*f^2*Si(2*c*f/d+2*f
*x)*sin(-2*e+2*c*f/d)/d^3+a^2*f^2*Ci(c*f/d+f*x)*sin(-e+c*f/d)/d^3-4*a^2*f*cos(1/2*e+1/4*Pi+1/2*f*x)*sin(1/2*e+
1/4*Pi+1/2*f*x)^3/d^2/(d*x+c)-2*a^2*sin(1/2*e+1/4*Pi+1/2*f*x)^4/d/(d*x+c)^2

________________________________________________________________________________________

Rubi [A]
time = 0.32, antiderivative size = 225, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 8, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3399, 3395, 3390, 31, 3384, 3380, 3383, 3393} \begin {gather*} -\frac {a^2 f^2 \text {CosIntegral}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d^3}+\frac {a^2 f^2 \text {CosIntegral}\left (\frac {2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac {2 c f}{d}\right )}{d^3}-\frac {a^2 f^2 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d^3}-\frac {a^2 f^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d^3}-\frac {4 a^2 f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {2 a^2 \sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d (c+d x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^2/(c + d*x)^3,x]

[Out]

(a^2*f^2*Cos[2*e - (2*c*f)/d]*CosIntegral[(2*c*f)/d + 2*f*x])/d^3 - (a^2*f^2*CosIntegral[(c*f)/d + f*x]*Sin[e
- (c*f)/d])/d^3 - (4*a^2*f*Cos[e/2 + Pi/4 + (f*x)/2]*Sin[e/2 + Pi/4 + (f*x)/2]^3)/(d^2*(c + d*x)) - (2*a^2*Sin
[e/2 + Pi/4 + (f*x)/2]^4)/(d*(c + d*x)^2) - (a^2*f^2*Cos[e - (c*f)/d]*SinIntegral[(c*f)/d + f*x])/d^3 - (a^2*f
^2*Sin[2*e - (2*c*f)/d]*SinIntegral[(2*c*f)/d + 2*f*x])/d^3

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3390

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + ((f_.)*(x_))/2]^2, x_Symbol] :> Dist[1/2, Int[(c + d*x)^m, x], x] -
 Dist[1/2, Int[(c + d*x)^m*Cos[2*e + f*x], x], x] /; FreeQ[{c, d, e, f, m}, x]

Rule 3393

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Int[ExpandTrigReduce[(c + d*x)^m, Sin
[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1])
)

Rule 3395

Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(c + d*x)^(m + 1)*((b*Si
n[e + f*x])^n/(d*(m + 1))), x] + (Dist[b^2*f^2*n*((n - 1)/(d^2*(m + 1)*(m + 2))), Int[(c + d*x)^(m + 2)*(b*Sin
[e + f*x])^(n - 2), x], x] - Dist[f^2*(n^2/(d^2*(m + 1)*(m + 2))), Int[(c + d*x)^(m + 2)*(b*Sin[e + f*x])^n, x
], x] - Simp[b*f*n*(c + d*x)^(m + 2)*Cos[e + f*x]*((b*Sin[e + f*x])^(n - 1)/(d^2*(m + 1)*(m + 2))), x]) /; Fre
eQ[{b, c, d, e, f}, x] && GtQ[n, 1] && LtQ[m, -2]

Rule 3399

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(2*a)^n, Int[(c
 + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2
- b^2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])

Rubi steps

\begin {align*} \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx &=\left (4 a^2\right ) \int \frac {\sin ^4\left (\frac {1}{2} \left (e+\frac {\pi }{2}\right )+\frac {f x}{2}\right )}{(c+d x)^3} \, dx\\ &=-\frac {4 a^2 f \cos \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right ) \sin ^3\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {2 a^2 \sin ^4\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}+\frac {\left (6 a^2 f^2\right ) \int \frac {\sin ^2\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{c+d x} \, dx}{d^2}-\frac {\left (8 a^2 f^2\right ) \int \frac {\sin ^4\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{c+d x} \, dx}{d^2}\\ &=-\frac {4 a^2 f \cos \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right ) \sin ^3\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {2 a^2 \sin ^4\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}+\frac {\left (3 a^2 f^2\right ) \int \frac {1}{c+d x} \, dx}{d^2}-\frac {\left (3 a^2 f^2\right ) \int \frac {\cos \left (2 \left (\frac {e}{2}+\frac {\pi }{4}\right )+f x\right )}{c+d x} \, dx}{d^2}-\frac {\left (8 a^2 f^2\right ) \int \left (\frac {3}{8 (c+d x)}-\frac {\cos (2 e+2 f x)}{8 (c+d x)}+\frac {\sin (e+f x)}{2 (c+d x)}\right ) \, dx}{d^2}\\ &=-\frac {4 a^2 f \cos \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right ) \sin ^3\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {2 a^2 \sin ^4\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}+\frac {\left (a^2 f^2\right ) \int \frac {\cos (2 e+2 f x)}{c+d x} \, dx}{d^2}-\frac {\left (4 a^2 f^2\right ) \int \frac {\sin (e+f x)}{c+d x} \, dx}{d^2}+\frac {\left (3 a^2 f^2 \cos \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sin \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d^2}+\frac {\left (3 a^2 f^2 \sin \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cos \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d^2}\\ &=\frac {3 a^2 f^2 \text {Ci}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d^3}-\frac {4 a^2 f \cos \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right ) \sin ^3\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {2 a^2 \sin ^4\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}+\frac {3 a^2 f^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d^3}+\frac {\left (a^2 f^2 \cos \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\cos \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d^2}-\frac {\left (4 a^2 f^2 \cos \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sin \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d^2}-\frac {\left (a^2 f^2 \sin \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\sin \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d^2}-\frac {\left (4 a^2 f^2 \sin \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cos \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d^2}\\ &=\frac {a^2 f^2 \cos \left (2 e-\frac {2 c f}{d}\right ) \text {Ci}\left (\frac {2 c f}{d}+2 f x\right )}{d^3}-\frac {a^2 f^2 \text {Ci}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d^3}-\frac {4 a^2 f \cos \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right ) \sin ^3\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {2 a^2 \sin ^4\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {a^2 f^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d^3}-\frac {a^2 f^2 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{d^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.60, size = 353, normalized size = 1.57 \begin {gather*} -\frac {a^2 \left (3 d^2+4 c d f \cos (e+f x)+4 d^2 f x \cos (e+f x)-d^2 \cos (2 (e+f x))-4 f^2 (c+d x)^2 \cos \left (2 e-\frac {2 c f}{d}\right ) \text {Ci}\left (\frac {2 f (c+d x)}{d}\right )+4 f^2 (c+d x)^2 \text {Ci}\left (f \left (\frac {c}{d}+x\right )\right ) \sin \left (e-\frac {c f}{d}\right )+4 d^2 \sin (e+f x)+2 c d f \sin (2 (e+f x))+2 d^2 f x \sin (2 (e+f x))+4 c^2 f^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )+8 c d f^2 x \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )+4 d^2 f^2 x^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )+4 c^2 f^2 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 f (c+d x)}{d}\right )+8 c d f^2 x \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 f (c+d x)}{d}\right )+4 d^2 f^2 x^2 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 f (c+d x)}{d}\right )\right )}{4 d^3 (c+d x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^2/(c + d*x)^3,x]

[Out]

-1/4*(a^2*(3*d^2 + 4*c*d*f*Cos[e + f*x] + 4*d^2*f*x*Cos[e + f*x] - d^2*Cos[2*(e + f*x)] - 4*f^2*(c + d*x)^2*Co
s[2*e - (2*c*f)/d]*CosIntegral[(2*f*(c + d*x))/d] + 4*f^2*(c + d*x)^2*CosIntegral[f*(c/d + x)]*Sin[e - (c*f)/d
] + 4*d^2*Sin[e + f*x] + 2*c*d*f*Sin[2*(e + f*x)] + 2*d^2*f*x*Sin[2*(e + f*x)] + 4*c^2*f^2*Cos[e - (c*f)/d]*Si
nIntegral[f*(c/d + x)] + 8*c*d*f^2*x*Cos[e - (c*f)/d]*SinIntegral[f*(c/d + x)] + 4*d^2*f^2*x^2*Cos[e - (c*f)/d
]*SinIntegral[f*(c/d + x)] + 4*c^2*f^2*Sin[2*e - (2*c*f)/d]*SinIntegral[(2*f*(c + d*x))/d] + 8*c*d*f^2*x*Sin[2
*e - (2*c*f)/d]*SinIntegral[(2*f*(c + d*x))/d] + 4*d^2*f^2*x^2*Sin[2*e - (2*c*f)/d]*SinIntegral[(2*f*(c + d*x)
)/d]))/(d^3*(c + d*x)^2)

________________________________________________________________________________________

Maple [A]
time = 0.15, size = 347, normalized size = 1.54

method result size
derivativedivides \(\frac {-\frac {3 a^{2} f^{3}}{4 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {a^{2} f^{3} \left (-\frac {\cos \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {-\frac {2 \sin \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}+\frac {\frac {4 \sinIntegral \left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \sin \left (\frac {2 c f -2 d e}{d}\right )}{d}+\frac {4 \cosineIntegral \left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \cos \left (\frac {2 c f -2 d e}{d}\right )}{d}}{d}}{d}\right )}{4}+2 a^{2} f^{3} \left (-\frac {\sin \left (f x +e \right )}{2 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}+\frac {-\frac {\cos \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}-\frac {\frac {\sinIntegral \left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\cosineIntegral \left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}}{d}}{2 d}\right )}{f}\) \(347\)
default \(\frac {-\frac {3 a^{2} f^{3}}{4 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {a^{2} f^{3} \left (-\frac {\cos \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {-\frac {2 \sin \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}+\frac {\frac {4 \sinIntegral \left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \sin \left (\frac {2 c f -2 d e}{d}\right )}{d}+\frac {4 \cosineIntegral \left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \cos \left (\frac {2 c f -2 d e}{d}\right )}{d}}{d}}{d}\right )}{4}+2 a^{2} f^{3} \left (-\frac {\sin \left (f x +e \right )}{2 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}+\frac {-\frac {\cos \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}-\frac {\frac {\sinIntegral \left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\cosineIntegral \left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}}{d}}{2 d}\right )}{f}\) \(347\)
risch \(\frac {i f^{2} a^{2} {\mathrm e}^{\frac {i \left (c f -d e \right )}{d}} \expIntegral \left (1, i f x +i e +\frac {i \left (c f -d e \right )}{d}\right )}{2 d^{3}}-\frac {3 a^{2}}{4 d \left (d x +c \right )^{2}}-\frac {a^{2} f^{2} {\mathrm e}^{\frac {2 i \left (c f -d e \right )}{d}} \expIntegral \left (1, 2 i f x +2 i e +\frac {2 i \left (c f -d e \right )}{d}\right )}{2 d^{3}}-\frac {a^{2} f^{2} {\mathrm e}^{-\frac {2 i \left (c f -d e \right )}{d}} \expIntegral \left (1, -2 i f x -2 i e -\frac {2 \left (i c f -i d e \right )}{d}\right )}{2 d^{3}}-\frac {i a^{2} f^{2} {\mathrm e}^{-\frac {i \left (c f -d e \right )}{d}} \expIntegral \left (1, -i f x -i e -\frac {i c f -i d e}{d}\right )}{2 d^{3}}+\frac {i a^{2} \left (-2 i d^{3} f^{3} x^{3}-6 i c \,d^{2} f^{3} x^{2}-6 i c^{2} d \,f^{3} x -2 i c^{3} f^{3}\right ) \cos \left (f x +e \right )}{2 d^{2} \left (d x +c \right )^{2} \left (-d^{2} x^{2} f^{2}-2 c d \,f^{2} x -c^{2} f^{2}\right )}-\frac {a^{2} \left (-2 d^{2} x^{2} f^{2}-4 c d \,f^{2} x -2 c^{2} f^{2}\right ) \sin \left (f x +e \right )}{2 d \left (d x +c \right )^{2} \left (-d^{2} x^{2} f^{2}-2 c d \,f^{2} x -c^{2} f^{2}\right )}+\frac {a^{2} \left (-2 d^{3} f^{2} x^{2}-4 c \,d^{2} f^{2} x -2 c^{2} d \,f^{2}\right ) \cos \left (2 f x +2 e \right )}{8 d^{2} \left (d x +c \right )^{2} \left (-d^{2} x^{2} f^{2}-2 c d \,f^{2} x -c^{2} f^{2}\right )}-\frac {i a^{2} \left (4 i d^{3} f^{3} x^{3}+12 i c \,d^{2} f^{3} x^{2}+12 i c^{2} d \,f^{3} x +4 i c^{3} f^{3}\right ) \sin \left (2 f x +2 e \right )}{8 d^{2} \left (d x +c \right )^{2} \left (-d^{2} x^{2} f^{2}-2 c d \,f^{2} x -c^{2} f^{2}\right )}\) \(594\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2/(d*x+c)^3,x,method=_RETURNVERBOSE)

[Out]

1/f*(-3/4*a^2*f^3/(c*f-d*e+d*(f*x+e))^2/d-1/4*a^2*f^3*(-cos(2*f*x+2*e)/(c*f-d*e+d*(f*x+e))^2/d-(-2*sin(2*f*x+2
*e)/(c*f-d*e+d*(f*x+e))/d+2*(2*Si(2*f*x+2*e+2*(c*f-d*e)/d)*sin(2*(c*f-d*e)/d)/d+2*Ci(2*f*x+2*e+2*(c*f-d*e)/d)*
cos(2*(c*f-d*e)/d)/d)/d)/d)+2*a^2*f^3*(-1/2*sin(f*x+e)/(c*f-d*e+d*(f*x+e))^2/d+1/2*(-cos(f*x+e)/(c*f-d*e+d*(f*
x+e))/d-(Si(f*x+e+(c*f-d*e)/d)*cos((c*f-d*e)/d)/d-Ci(f*x+e+(c*f-d*e)/d)*sin((c*f-d*e)/d)/d)/d)/d))

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.59, size = 504, normalized size = 2.24 \begin {gather*} -\frac {\frac {2 \, a^{2} f^{3}}{{\left (f x + e\right )}^{2} d^{3} + c^{2} d f^{2} - 2 \, c d^{2} f e + d^{3} e^{2} + 2 \, {\left (c d^{2} f - d^{3} e\right )} {\left (f x + e\right )}} - \frac {{\left (f^{3} {\left (E_{3}\left (\frac {2 \, {\left (-i \, {\left (f x + e\right )} d - i \, c f + i \, d e\right )}}{d}\right ) + E_{3}\left (-\frac {2 \, {\left (-i \, {\left (f x + e\right )} d - i \, c f + i \, d e\right )}}{d}\right )\right )} \cos \left (\frac {2 \, {\left (c f - d e\right )}}{d}\right ) - f^{3} {\left (i \, E_{3}\left (\frac {2 \, {\left (-i \, {\left (f x + e\right )} d - i \, c f + i \, d e\right )}}{d}\right ) - i \, E_{3}\left (-\frac {2 \, {\left (-i \, {\left (f x + e\right )} d - i \, c f + i \, d e\right )}}{d}\right )\right )} \sin \left (\frac {2 \, {\left (c f - d e\right )}}{d}\right ) - f^{3}\right )} a^{2}}{{\left (f x + e\right )}^{2} d^{3} + c^{2} d f^{2} - 2 \, c d^{2} f e + d^{3} e^{2} + 2 \, {\left (c d^{2} f - d^{3} e\right )} {\left (f x + e\right )}} - \frac {4 \, {\left (f^{3} {\left (-i \, E_{3}\left (\frac {i \, {\left (f x + e\right )} d + i \, c f - i \, d e}{d}\right ) + i \, E_{3}\left (-\frac {i \, {\left (f x + e\right )} d + i \, c f - i \, d e}{d}\right )\right )} \cos \left (\frac {c f - d e}{d}\right ) + f^{3} {\left (E_{3}\left (\frac {i \, {\left (f x + e\right )} d + i \, c f - i \, d e}{d}\right ) + E_{3}\left (-\frac {i \, {\left (f x + e\right )} d + i \, c f - i \, d e}{d}\right )\right )} \sin \left (\frac {c f - d e}{d}\right )\right )} a^{2}}{{\left (f x + e\right )}^{2} d^{3} + c^{2} d f^{2} - 2 \, c d^{2} f e + d^{3} e^{2} + 2 \, {\left (c d^{2} f - d^{3} e\right )} {\left (f x + e\right )}}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2/(d*x+c)^3,x, algorithm="maxima")

[Out]

-1/4*(2*a^2*f^3/((f*x + e)^2*d^3 + c^2*d*f^2 - 2*c*d^2*f*e + d^3*e^2 + 2*(c*d^2*f - d^3*e)*(f*x + e)) - (f^3*(
exp_integral_e(3, 2*(-I*(f*x + e)*d - I*c*f + I*d*e)/d) + exp_integral_e(3, -2*(-I*(f*x + e)*d - I*c*f + I*d*e
)/d))*cos(2*(c*f - d*e)/d) - f^3*(I*exp_integral_e(3, 2*(-I*(f*x + e)*d - I*c*f + I*d*e)/d) - I*exp_integral_e
(3, -2*(-I*(f*x + e)*d - I*c*f + I*d*e)/d))*sin(2*(c*f - d*e)/d) - f^3)*a^2/((f*x + e)^2*d^3 + c^2*d*f^2 - 2*c
*d^2*f*e + d^3*e^2 + 2*(c*d^2*f - d^3*e)*(f*x + e)) - 4*(f^3*(-I*exp_integral_e(3, (I*(f*x + e)*d + I*c*f - I*
d*e)/d) + I*exp_integral_e(3, -(I*(f*x + e)*d + I*c*f - I*d*e)/d))*cos((c*f - d*e)/d) + f^3*(exp_integral_e(3,
 (I*(f*x + e)*d + I*c*f - I*d*e)/d) + exp_integral_e(3, -(I*(f*x + e)*d + I*c*f - I*d*e)/d))*sin((c*f - d*e)/d
))*a^2/((f*x + e)^2*d^3 + c^2*d*f^2 - 2*c*d^2*f*e + d^3*e^2 + 2*(c*d^2*f - d^3*e)*(f*x + e)))/f

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 484 vs. \(2 (214) = 428\).
time = 0.45, size = 484, normalized size = 2.15 \begin {gather*} \frac {a^{2} d^{2} \cos \left (f x + e\right )^{2} - 2 \, a^{2} d^{2} - 2 \, {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \sin \left (-\frac {2 \, {\left (c f - d e\right )}}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - 2 \, {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \cos \left (-\frac {c f - d e}{d}\right ) \operatorname {Si}\left (\frac {d f x + c f}{d}\right ) - 2 \, {\left (a^{2} d^{2} f x + a^{2} c d f\right )} \cos \left (f x + e\right ) + {\left ({\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \operatorname {Ci}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \operatorname {Ci}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right )\right )} \cos \left (-\frac {2 \, {\left (c f - d e\right )}}{d}\right ) - 2 \, {\left (a^{2} d^{2} + {\left (a^{2} d^{2} f x + a^{2} c d f\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right ) - {\left ({\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \operatorname {Ci}\left (\frac {d f x + c f}{d}\right ) + {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \operatorname {Ci}\left (-\frac {d f x + c f}{d}\right )\right )} \sin \left (-\frac {c f - d e}{d}\right )}{2 \, {\left (d^{5} x^{2} + 2 \, c d^{4} x + c^{2} d^{3}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2/(d*x+c)^3,x, algorithm="fricas")

[Out]

1/2*(a^2*d^2*cos(f*x + e)^2 - 2*a^2*d^2 - 2*(a^2*d^2*f^2*x^2 + 2*a^2*c*d*f^2*x + a^2*c^2*f^2)*sin(-2*(c*f - d*
e)/d)*sin_integral(2*(d*f*x + c*f)/d) - 2*(a^2*d^2*f^2*x^2 + 2*a^2*c*d*f^2*x + a^2*c^2*f^2)*cos(-(c*f - d*e)/d
)*sin_integral((d*f*x + c*f)/d) - 2*(a^2*d^2*f*x + a^2*c*d*f)*cos(f*x + e) + ((a^2*d^2*f^2*x^2 + 2*a^2*c*d*f^2
*x + a^2*c^2*f^2)*cos_integral(2*(d*f*x + c*f)/d) + (a^2*d^2*f^2*x^2 + 2*a^2*c*d*f^2*x + a^2*c^2*f^2)*cos_inte
gral(-2*(d*f*x + c*f)/d))*cos(-2*(c*f - d*e)/d) - 2*(a^2*d^2 + (a^2*d^2*f*x + a^2*c*d*f)*cos(f*x + e))*sin(f*x
 + e) - ((a^2*d^2*f^2*x^2 + 2*a^2*c*d*f^2*x + a^2*c^2*f^2)*cos_integral((d*f*x + c*f)/d) + (a^2*d^2*f^2*x^2 +
2*a^2*c*d*f^2*x + a^2*c^2*f^2)*cos_integral(-(d*f*x + c*f)/d))*sin(-(c*f - d*e)/d))/(d^5*x^2 + 2*c*d^4*x + c^2
*d^3)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{2} \left (\int \frac {2 \sin {\left (e + f x \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {\sin ^{2}{\left (e + f x \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {1}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2/(d*x+c)**3,x)

[Out]

a**2*(Integral(2*sin(e + f*x)/(c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x) + Integral(sin(e + f*x)**2/(
c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x) + Integral(1/(c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3
), x))

________________________________________________________________________________________

Giac [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 3.59, size = 124086, normalized size = 551.49 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2/(d*x+c)^3,x, algorithm="giac")

[Out]

-1/2*(a^2*d^2*f^2*x^2*imag_part(cos_integral(f*x + c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/
d)^2*tan(1/2*e)^2*tan(e)^2 - a^2*d^2*f^2*x^2*imag_part(cos_integral(-f*x - c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*t
an(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 - a^2*d^2*f^2*x^2*real_part(cos_integral(2*f*x + 2*c*f/d))*
tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 - a^2*d^2*f^2*x^2*real_part(cos_
integral(-2*f*x - 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 + 2*
a^2*d^2*f^2*x^2*sin_integral((d*f*x + c*f)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*
e)^2*tan(e)^2 - 2*a^2*d^2*f^2*x^2*imag_part(cos_integral(2*f*x + 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d
)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e) + 2*a^2*d^2*f^2*x^2*imag_part(cos_integral(-2*f*x - 2*c*f/d))*tan(f*x
)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e) - 4*a^2*d^2*f^2*x^2*sin_integral(2*(d*f*x
 + c*f)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e) - 2*a^2*d^2*f^2*x^2*rea
l_part(cos_integral(f*x + c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)*tan(e)^2
- 2*a^2*d^2*f^2*x^2*real_part(cos_integral(-f*x - c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d
)^2*tan(1/2*e)*tan(e)^2 + 2*a^2*d^2*f^2*x^2*real_part(cos_integral(f*x + c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan
(c*f/d)^2*tan(1/2*c*f/d)*tan(1/2*e)^2*tan(e)^2 + 2*a^2*d^2*f^2*x^2*real_part(cos_integral(-f*x - c*f/d))*tan(f
*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)*tan(1/2*e)^2*tan(e)^2 + 2*a^2*d^2*f^2*x^2*imag_part(cos_integ
ral(2*f*x + 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 - 2*a^2*d^2*
f^2*x^2*imag_part(cos_integral(-2*f*x - 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)*tan(1/2*c*f/d)^2*tan(1/
2*e)^2*tan(e)^2 + 4*a^2*d^2*f^2*x^2*sin_integral(2*(d*f*x + c*f)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)*tan(1
/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 + 2*a^2*c*d*f^2*x*imag_part(cos_integral(f*x + c*f/d))*tan(f*x)^2*tan(1/2*f*
x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 - 2*a^2*c*d*f^2*x*imag_part(cos_integral(-f*x - c*f/d
))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 - 2*a^2*c*d*f^2*x*real_part(c
os_integral(2*f*x + 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 -
2*a^2*c*d*f^2*x*real_part(cos_integral(-2*f*x - 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d
)^2*tan(1/2*e)^2*tan(e)^2 + 4*a^2*c*d*f^2*x*sin_integral((d*f*x + c*f)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)
^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e)^2 + a^2*d^2*f^2*x^2*imag_part(cos_integral(f*x + c*f/d))*tan(f*x)^2*ta
n(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2 - a^2*d^2*f^2*x^2*imag_part(cos_integral(-f*x - c*f/d)
)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2 + a^2*d^2*f^2*x^2*real_part(cos_integra
l(2*f*x + 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2 + a^2*d^2*f^2*x^2*rea
l_part(cos_integral(-2*f*x - 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2 +
2*a^2*d^2*f^2*x^2*sin_integral((d*f*x + c*f)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/
2*e)^2 - 4*a^2*d^2*f^2*x^2*real_part(cos_integral(2*f*x + 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)*tan(1
/2*c*f/d)^2*tan(1/2*e)^2*tan(e) - 4*a^2*d^2*f^2*x^2*real_part(cos_integral(-2*f*x - 2*c*f/d))*tan(f*x)^2*tan(1
/2*f*x)^2*tan(c*f/d)*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e) - 4*a^2*c*d*f^2*x*imag_part(cos_integral(2*f*x + 2*c
*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e) + 4*a^2*c*d*f^2*x*imag_part
(cos_integral(-2*f*x - 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1/2*e)^2*tan(e) -
 8*a^2*c*d*f^2*x*sin_integral(2*(d*f*x + c*f)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(1
/2*e)^2*tan(e) - a^2*d^2*f^2*x^2*imag_part(cos_integral(f*x + c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*t
an(1/2*c*f/d)^2*tan(e)^2 + a^2*d^2*f^2*x^2*imag_part(cos_integral(-f*x - c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan
(c*f/d)^2*tan(1/2*c*f/d)^2*tan(e)^2 - a^2*d^2*f^2*x^2*real_part(cos_integral(2*f*x + 2*c*f/d))*tan(f*x)^2*tan(
1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(e)^2 - a^2*d^2*f^2*x^2*real_part(cos_integral(-2*f*x - 2*c*f/d))*
tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(e)^2 - 2*a^2*d^2*f^2*x^2*sin_integral((d*f*x + c*f
)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2*tan(e)^2 + 4*a^2*d^2*f^2*x^2*imag_part(cos_integr
al(f*x + c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)*tan(1/2*e)*tan(e)^2 - 4*a^2*d^2*f^2*x^2
*imag_part(cos_integral(-f*x - c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)*tan(1/2*e)*tan(e)
^2 + 8*a^2*d^2*f^2*x^2*sin_integral((d*f*x + c*f)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(c*f/d)^2*tan(1/2*c*f/d)*tan
(1/2*e)*tan(e)^2 - 4*a^2*c*d*f^2*x*real_part(co...

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2}{{\left (c+d\,x\right )}^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(e + f*x))^2/(c + d*x)^3,x)

[Out]

int((a + a*sin(e + f*x))^2/(c + d*x)^3, x)

________________________________________________________________________________________